home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir31 / sox10dos.zip / CHEAT < prev    next >
Text File  |  1993-10-04  |  2KB  |  74 lines

  1. This is a cheat sheet of examples using SOX to
  2. do various common sound file conversions.
  3.  
  4. Notes:
  5.  
  6. The SUN examples all assume the old SUN voice-quality 8khz u-law
  7. hardware.  If the .AU file doesn't have a proper header,
  8. you'll need the second command line.  If you don't want the
  9. old format, you can remove the "-r 8012 -U -b" in front of 
  10. "file.au" when converting TO SUN .au files.  Note that
  11. you'll need newer SUN sound hardware to successfully
  12. play these files.
  13.  
  14. VOC has a similar problem.  All VOC files have a correct
  15. header, but older hardware (and software) only knows
  16. about samples made of unsigned bytes.  
  17. VOC files come from the Sound Blaster and compatible
  18. cards on the IBM PC.  These cards can play many 
  19. sample rates; not quite a continuous spectrum
  20. but close enough.
  21.  
  22. The Mac sound hardware traditionally has been capable of
  23. sample rates 5012, 1025, and 22050, but only with unsigned
  24. bytes.  Recent models support CD-quality sound.
  25.  
  26. SUN .au to Mac .snd:
  27.  
  28.     sox file.au -r 11025 -t ub file.snd
  29. or:
  30.     sox -t ul -r 8012 file.au -r 11025 -t ub file.snd
  31.  
  32. When you copy the file to the Mac, you'll have to set
  33. the sample rate by hand.
  34.  
  35. Mac .snd to SUN .au
  36.  
  37.     sox -r 11025 -t ub file.snd -r 8012 -U -b file.au
  38.  
  39. The Mac file might also be at sample rates 5012, 22050, or 44100.
  40.  
  41. PC .voc to SUN .au
  42.  
  43.     sox file.voc -r 8012 -U -b file.au
  44.  
  45. SUN .au to PC .voc 
  46.  
  47.     sox file.au file.voc 
  48. or:
  49.     sox -r 8012 -t ul file.au file.voc 
  50.  
  51. SUN .au to WAV - without clipping
  52.     
  53.     sox file.au -s -w file.wav
  54. or:
  55.     sox -t ul -r 8012 file.au -s -w file.wav
  56.  
  57. WAV to SUN .au
  58.     
  59.     sox file.wav -r 8012 -U -b file.au
  60.  
  61. WAV to VOC
  62.     sox file.wav -u -b file.voc
  63.  
  64. VOC to WAV
  65.     sox file.voc file.wav
  66.  
  67. Any file to SUN .au
  68.  
  69. sox -t auto file.X -c 1 -t aiff - |  sox -t aiff - -r 8000 -U -b -t au file.au
  70.  
  71. Some people try to put this kind of command in scripts.
  72. Good luck!
  73.  
  74.